package com.bjbn.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 获取定时任务cron表达式
 */
@Component
@ConfigurationProperties(prefix = "task.schedule")
public class ScheduleConfig {
    private String airConditioningCleanCron;
    private String bridgeInfoCleanCron;
    private String powerInfoCleanCron;
    private Integer batchSize;
    
    // 数据保留周期配置
    private RetentionConfig retention;

    public String getAirConditioningCleanCron() {
        return airConditioningCleanCron;
    }

    public void setAirConditioningCleanCron(String airConditioningCleanCron) {
        this.airConditioningCleanCron = airConditioningCleanCron;
    }

    public Integer getBatchSize() {
        return batchSize;
    }

    public void setBatchSize(Integer batchSize) {
        this.batchSize = batchSize;
    }

    public String getBridgeInfoCleanCron() {
        return bridgeInfoCleanCron;
    }

    public void setBridgeInfoCleanCron(String bridgeInfoCleanCron) {
        this.bridgeInfoCleanCron = bridgeInfoCleanCron;
    }

    public String getPowerInfoCleanCron() {
        return powerInfoCleanCron;
    }

    public void setPowerInfoCleanCron(String powerInfoCleanCron) {
        this.powerInfoCleanCron = powerInfoCleanCron;
    }

    public RetentionConfig getRetention() {
        return retention;
    }

    public void setRetention(RetentionConfig retention) {
        this.retention = retention;
    }

    /**
     * 数据保留周期配置内部类
     */
    public static class RetentionConfig {
        private Integer airConditioningDays;
        private Integer bridgeInfoDays;
        private Integer powerInfoDays;

        public Integer getAirConditioningDays() {
            return airConditioningDays;
        }

        public void setAirConditioningDays(Integer airConditioningDays) {
            this.airConditioningDays = airConditioningDays;
        }

        public Integer getBridgeInfoDays() {
            return bridgeInfoDays;
        }

        public void setBridgeInfoDays(Integer bridgeInfoDays) {
            this.bridgeInfoDays = bridgeInfoDays;
        }

        public Integer getPowerInfoDays() {
            return powerInfoDays;
        }

        public void setPowerInfoDays(Integer powerInfoDays) {
            this.powerInfoDays = powerInfoDays;
        }
    }
}
